package com.erp.erp_entitys.Contract_Info;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.NotEmpty;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 * 外销合同主信息扩展表
 */
public class ContractInfoex implements Serializable {
    /**
     * 销售合同ID
     */
    @NotEmpty
    private Long contractid;

    /**
     * 状态箱ID
     */
    @NotEmpty
    private Integer boxid;

    /**
     * 合同执行状态
     */
    @NotEmpty
    private String execstatus;

    /**
     * 合同执行的时间
     */
    @NotEmpty
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date exectime;

    /**
     * 合同执行人
     */
    @NotEmpty
    private String execopcode;

    /**
     * 审批流程ID
     */
    @NotEmpty
    private Integer approveflowid;

    /**
     * 审批级别(一级审批，二级审批，联合审批)
     */
    @NotEmpty
    private Integer approvelevel;

    /**
     * 审批状态(已审批，未审批)
     */
    @NotEmpty
    private String approvestatus;

    /**
     * 审批人
     */
    @NotEmpty
    private String approveopcode;

    private static final long serialVersionUID = 1L;

    public Long getContractid() {
        return contractid;
    }

    public void setContractid(Long contractid) {
        this.contractid = contractid;
    }

    public Integer getBoxid() {
        return boxid;
    }

    public void setBoxid(Integer boxid) {
        this.boxid = boxid;
    }

    public String getExecstatus() {
        return execstatus;
    }

    public void setExecstatus(String execstatus) {
        this.execstatus = execstatus;
    }

    public Date getExectime() {
        return exectime;
    }

    public void setExectime(Date exectime) {
        this.exectime = exectime;
    }

    public String getExecopcode() {
        return execopcode;
    }

    public void setExecopcode(String execopcode) {
        this.execopcode = execopcode;
    }

    public Integer getApproveflowid() {
        return approveflowid;
    }

    public void setApproveflowid(Integer approveflowid) {
        this.approveflowid = approveflowid;
    }

    public Integer getApprovelevel() {
        return approvelevel;
    }

    public void setApprovelevel(Integer approvelevel) {
        this.approvelevel = approvelevel;
    }

    public String getApprovestatus() {
        return approvestatus;
    }

    public void setApprovestatus(String approvestatus) {
        this.approvestatus = approvestatus;
    }

    public String getApproveopcode() {
        return approveopcode;
    }

    public void setApproveopcode(String approveopcode) {
        this.approveopcode = approveopcode;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ContractInfoex other = (ContractInfoex) that;
        return (this.getContractid() == null ? other.getContractid() == null : this.getContractid().equals(other.getContractid()))
            && (this.getBoxid() == null ? other.getBoxid() == null : this.getBoxid().equals(other.getBoxid()))
            && (this.getExecstatus() == null ? other.getExecstatus() == null : this.getExecstatus().equals(other.getExecstatus()))
            && (this.getExectime() == null ? other.getExectime() == null : this.getExectime().equals(other.getExectime()))
            && (this.getExecopcode() == null ? other.getExecopcode() == null : this.getExecopcode().equals(other.getExecopcode()))
            && (this.getApproveflowid() == null ? other.getApproveflowid() == null : this.getApproveflowid().equals(other.getApproveflowid()))
            && (this.getApprovelevel() == null ? other.getApprovelevel() == null : this.getApprovelevel().equals(other.getApprovelevel()))
            && (this.getApprovestatus() == null ? other.getApprovestatus() == null : this.getApprovestatus().equals(other.getApprovestatus()))
            && (this.getApproveopcode() == null ? other.getApproveopcode() == null : this.getApproveopcode().equals(other.getApproveopcode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getContractid() == null) ? 0 : getContractid().hashCode());
        result = prime * result + ((getBoxid() == null) ? 0 : getBoxid().hashCode());
        result = prime * result + ((getExecstatus() == null) ? 0 : getExecstatus().hashCode());
        result = prime * result + ((getExectime() == null) ? 0 : getExectime().hashCode());
        result = prime * result + ((getExecopcode() == null) ? 0 : getExecopcode().hashCode());
        result = prime * result + ((getApproveflowid() == null) ? 0 : getApproveflowid().hashCode());
        result = prime * result + ((getApprovelevel() == null) ? 0 : getApprovelevel().hashCode());
        result = prime * result + ((getApprovestatus() == null) ? 0 : getApprovestatus().hashCode());
        result = prime * result + ((getApproveopcode() == null) ? 0 : getApproveopcode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", contractid=").append(contractid);
        sb.append(", boxid=").append(boxid);
        sb.append(", execstatus=").append(execstatus);
        sb.append(", exectime=").append(exectime);
        sb.append(", execopcode=").append(execopcode);
        sb.append(", approveflowid=").append(approveflowid);
        sb.append(", approvelevel=").append(approvelevel);
        sb.append(", approvestatus=").append(approvestatus);
        sb.append(", approveopcode=").append(approveopcode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}